<%--
  Created by IntelliJ IDEA.
  User: HRLea
  Date: 2019/4/29
  Time: 20:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="httpclient.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>信息页</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body style="text-align:center">
<div>
    <div style="font-size:20px;margin:0">
        <%User user = (User) request.getSession().getAttribute("user");
            if(user!=null) { %>
        <table style="font-size:15px;margin:0 auto">
            <tbody>
            <tr>
                <th class="th">学号</th>
                <td class="td"><%=user.getID()%></td>
            </tr>
            <tr>
                <th class="th">姓名</th>
                <td class="td"><%=user.getName()%></td>
            </tr>
            <tr>
                <th class="th">类别</th>
                <td class="td"><%=user.getGroup()%></td>
            </tr>
            <tr>
                <th class="th">openid</th>
                <td class="td"><%=user.getOpenid()%></td>
            </tr>
            </tbody>
        </table>
        <form action="Servlet2">
            <button type=submit id="submit1" name="submit2" style="width:10%;margin: 0;font-size:20px;">
                退出
            </button>
        </form>
        <%}else{%>
        <div style="font-size:20px">
            <form action="Servlet1" method="post">
                <button type=submit id="submit2" name="submit2" style="width:10%;margin: 0;font-size:20px;">
                    登录
                </button>
            </form>
        </div>
        <%}%>
    </div>
</div>
</body>
</html>
